<!DOCTYPE html>
<html>
<head>
    <title>日新网 - 快讯列表</title>
    <meta name="keywords" content="{$seo_keywords}"/>
    <meta name="description" content="{$seo_description}">
    <tc_include file="Public:head"/>
    <link href="/themes/simplebootx/Public/assets/css/index/style.css?v={$SOURCE_VERSION}" rel="stylesheet"/>
    <link href="/themes/simplebootx/Public/assets/css/index/skitter.css" rel="stylesheet"/>
    <style>
        .newsFlash .new_list {
            font-size: 16px;
            line-height: 20px;
            position: relative;
            margin-top: 10px;
        }
        .newsFlash .new_list .newsFlash_content {
            font-size: 14px;
        }
        .color-tab {
            color: #c8161d!important;
        }
        .ellipsis2 {overflow: hidden; text-overflow:ellipsis; display: -webkit-box; -webkit-line-clamp: 2;-webkit-box-orient: vertical;}
        .ellipsis3 {overflow: hidden; text-overflow:ellipsis; display: -webkit-box; -webkit-line-clamp: 3;-webkit-box-orient: vertical;}
        .no-active {
            display: none;
        }
        /*主页行家样式修改*/
        .desc span {
            font-size: 14px;
            line-height: 18px;
        }
        .desc .mz {
            color: #000232!important;
            font-size: 18px;
        }
        /*商讯*/
        .sl_nav {
            margin-top: 10px!important;
            margin-bottom:0!important;
        }
        .business_item{
            margin-top: 25px;
            border-bottom: 1px solid #efefef;
        }
        .business_item .title{
            font-size: 18px;
            color: #333333;
            line-height: 24px;
            letter-spacing: 1px;
            font-weight: bolder;
        }
        .business_item .icon{
            font-size: 14px;
            line-height: 18px;
            color: #c5c5c5;
            margin: 4px 0 6px;
        }
        .business_item .icon .name{
            float: right;
        }
        /*侧边栏样式*/
        .span3 .release_btn {
            font-size: 18px;
            font-weight: bold;
            letter-spacing: 2px;
            margin-top: 15px;
        }
        .span3 .release_btn a {
            color: #c8161d;
        }
        .span3 .advertise {
            height: 210px;
            width: 350px;
            margin-top: 58px;
        }
        .span3 .advertise img{
            width: 100%;
            height: 100%;
        }
        .span3 .author {
            margin-top: 52px;
        }
    </style>
</head>
<body>

<tc_include file="Public:nav"/>

<div class="container tc-main">
    <div class="row" style="margin-left:0px;width: 1200px;">
        <!-- margin-left: 0px; -->
        <div class="span9" style="width: 760px;margin-left: 0px;">
            <!-- 快讯列表 -->
            <div class="sl_nav_out">
                <div class="sl_nav" id="sl_nav">
                    <ul>
                        <li>
                            <a class="{$cat_id == 0 ? 'color-tab' : ''}" href="{:U('Portal/List/news_list')}">全部</a>
                        </li>
                        <foreach name="categorys" item="vo">
                            <li>
                                <a class="{$cat_id == $vo['id'] ? 'color-tab' : ''}" href="{:U('Portal/List/news_list',array('cat_id' => $vo['id']))}">{$vo.name}</a>
                            </li>
                        </foreach>
                    </ul>
                </div>
                <div class="business">
                    <volist name="news_lists" id="vo">
                        <a href="{:U('Portal/List/news_detail', ['id' => $vo['id']])}">
                            <div class="business_item">
                                <p class="ellipsis2 title">{$vo.post_title}</p>
                                <div class="icon">
                                    <span class="timer">{:time_format($vo['post_date'])}</span>
                                    <span class="name">{$vo.post_author_name}</span>
                                </div>
                            </div>
                        </a>
                    </volist>
                </div>

                <!--加载更多-->
                <div style="width:110px;height: 30px;border-radius: 15px;border: 1px solid #C8161D; color: #C8161D;font-size: 15px;text-align: center;
            line-height: 30px;margin-left: 350px; " class="js-infinite-scroll-loading text-center fontmsyhbd">更多</div>
                <div id="nextpage"></div>
            </div>
            <!-- 标题页结束 -->
        </div>
        <!--slide边栏-->
        <div class="span3" style="margin-left: 80px;width: 350px;">
            <!--日新早报-->
            <if condition="!empty($report)">
                <php>
                    $weekarray  = array("日","一","二","三","四","五","六");
                    $post_date  = strtotime($report['post_date']);
                    $week       = $weekarray[date('w', $post_date)];
                </php>
                <div class="morning_paper_ground" style="margin-top:15px;">
                    <div class="morning_paper">
                        <div class="top">
                            <span class="time1">{:date('m', $post_date)}</span>
                            <span class="line"></span>
                            <span class="time2">{:date('d', $post_date)}</span>
                            <span class="week">星期{$week}</span>
                            <a href="{:U('Portal/Article/daily_report_list')}" class="more"></a>
                        </div>
                        <a href="{:U('Portal/Article/daily_report_detail', ['id' => $report['id']])}">
                            <h2>日新早报</h2>
                            <p class="text ellipsis3">“{$report.post_title}”</p>
                        </a>
                    </div>
                </div>

            </if>
            <!--广告位-->
            <if condition="!empty($advertisement)">
                <a href="{$advertisement.post_source}">
                    <div class="advertise">
                        <img src="{$advertisement.thumb_img}" alt="">
                    </div>
                </a>
            </if>
        </div>
    </div>
</div>
<tc_include file="Public:footer"/>
<!-- JavaScript -->
<tc_include file="Public:scripts"/>
<script>
    var week = new Date().getDay();
    if (week == 6 || week == 0) {
        week = 1;
    }
    var color = [
        "{:sp_get_asset_upload_path('http://video.rixins.com/image/default/3A8965BD580040C4B30F94905876B703-6-2.jpg')}",
        "{:sp_get_asset_upload_path('http://video.rixins.com/image/default/34C9C1E7AFFC486DA48E6301C73A20E2-6-2.jpg')}",
        "{:sp_get_asset_upload_path('http://video.rixins.com/image/default/C9ED79757677477CAEF0ACFA5B28C0A2-6-2.jpg')}",
        "{:sp_get_asset_upload_path('http://video.rixins.com/image/default/AD4DABB96E484D14A4C1530B89A00BDB-6-2.jpg')}",
        "{:sp_get_asset_upload_path('http://video.rixins.com/image/default/A6D019E02FF5422086C938FADD651F0C-6-2.jpg')}",
    ];
    $('.morning_paper').css('background', "url(" + color[week - 1] + ")");
</script>
<script type="text/javascript">
    // 滚动文章
    $(document).ready(function () {

        $(".box_skitter_large").skitter({
            animation: "random",
            interval: 3000,
            numbers: false,
            numbers_align: "right",
            hideTools: true,
            controls: false,
            focus: false,
            focus_position: true,
            width_label: '425px',
            enable_navigation_keys: true,
            progressbar: false
        });
    });
</script>
<script src="__TMPL__Public/assets/js/jquery.infiniteScroll.js"></script>
<script type="text/javascript">

    $('#nextpage').infiniteScroll({
        loading:'.js-infinite-scroll-loading',
        total_pages:{$total_pages},
        success:function(content){
            var $items = $(content).find('div.business a');
            if ($items.length > 0) {
                $('div.business').append($items);
            }
        }
    });


    // tab 导航栏置顶
    (function () {
        var target = document.getElementById('sl_nav');

        window.onscroll = function () {
            var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
            if (scrollTop > 300) {
                target.classList.add('act');
            }
            else {
                target.classList.remove('act');
            }
        }
    })();

    $(document).ready(function () {
        $('.new_list').click(function () {
            $(this).find('.newsFlash_content').slideToggle("fast");
        })
    })
</script>
</body>
</html>